<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    const obj = {};

    Object.defineProperty(obj, "name", {
        value: "默认值",
        writable: true,
        enumerable: true
    })

    console.log(obj)

    console.log(obj.name)

    obj.name = "zhangsan";
    
    console.log(obj.name)

    for(let i in obj){
        console.log(i, obj[i])
    }

    
    
</script>
</html>